import * as ActionTypes from '../../constants/ActionType';
import * as APIS from '../../constants/APIS';
import { fetchPOST, fetchGET } from '../../utils/index';
var path = require('path');

const {
    SET_APP_STATE,
    GET_ARTICLE
     } = ActionTypes;

export const setState = (value) => { return dispatch => dispatch({ type: SET_APP_STATE, payload: value }) };

export const getArticle = () => {
    return dispatch => {
        fetchGET(APIS.IS_GET_ARTICLES, {})
            .then((res) => {
                dispatch({ type: GET_ARTICLE, payload: res.data });
            })
    }
}
